package cn.leaf.interpreter;

/**
 *
 * desc: 解释器模式
 *
 * @author twinkle-leaf
 * @version v1.0.0
 * slogan: There are no two identical leaves in the world.🍃
 *
 */
public class Test {
    public static void main(String[] args) {
        Expression expression = new SubtractExpression(
            new AddExpression(
                new NumberExpression(3),
                new NumberExpression(5)
            ),
            new NumberExpression(2)
        );

        System.out.println(expression.interpret());
    }
}